package com.rc.saas.tenant.service.parking;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.mapper.parking.TenantParkingSupplierMapper;
import com.rc.saas.tenant.model.parking.TenantParkingSupplier;
import com.rc.saas.tenant.model.parking.TenantParkingSupplierExample;
import com.rc.saas.tenant.search.tenant.TenantParkingSupplierSearch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TenantParkingSupplierServiceImpl implements TenantParkingSupplierService {

    @Autowired
    private TenantParkingSupplierMapper tenantParkingSupplierMapper;

    @Override
    public TenantParkingSupplierMapper getMapper() {
        return tenantParkingSupplierMapper;
    }

    @Override
    public PageInfo<TenantParkingSupplier> listPageTenantParkingSupplier(TenantParkingSupplierSearch tenantParkingSupplierSearch) {
        PageHelper.startPage(tenantParkingSupplierSearch.getOffset(), tenantParkingSupplierSearch.getLimit());
        List<TenantParkingSupplier> tenantParkingSupplierList = tenantParkingSupplierMapper.listPageTenantParkingSupplier(tenantParkingSupplierSearch);
        return new PageInfo<TenantParkingSupplier>(tenantParkingSupplierList);

    }
}
